﻿package tv.colmeia.game.assets {
	/**
	* ...
	* @author Martin Fabichak @ colmeia.tv
	*/
	import flash.events.Event;
	import org.cove.ape.CollisionEvent;
	import org.cove.ape.RectangleParticle;
	import tv.colmeia.game.assets.sprites.EnfermeiroSprite;
	
	public class Enfermeiros extends RectangleParticle {
		
		public function Enfermeiros(sprite:EnfermeiroSprite) {
			super(sprite.x+sprite.width/2, sprite.y+sprite.height/2, sprite.width, sprite.height-10);
			this.collidable = true;
			this.sprite.name = "enfermeiros";
			this.addEventListener(CollisionEvent.COLLIDE, collide);
			this.setDisplay(sprite,0,-10);
			this.mass = 10;
		}
		
		private function collide(e:CollisionEvent):void {
			if ((e.collidingItem.visible))	{
				( e.collidingItem as Vitima).fall(100, - 150);
			}
		}
		
	}
	
}